Short: Source code of awinquake 0.4, a68k/ppc Author: Peter McGavin (p.mcgavin@irl.cri.nz) Type: game/shoot Uploader: Peter McGavin (p.mcgavin@irl.cri.nz) Version: 0.4 This archive contains the SAS/C Amiga source code of awinquake and awinquakeppc 0.4. You don't need it to play winquake or awinquakeppc, only if you want to try and compile it or look at how it works. awinquake was derived from the original ID Software Linux winquake source which you can download from: ftp://ftp.cdrom.com/pub/idgames/idstuff/source/q1source.zip My modified source code should still compile for Linux (APUS), Solaris, Win95, etc, with no changes --- untested. All winquake support files for those platforms are included in this archive, even though they are not used by the Amiga version. ------------------------------------------------------------------------ v0.4 11 Jan 2000 vid_amiga.c: Call cybergraphics.library WritePixelArray() instead of WriteChunkyPixels() under KS3.0 (provided cgx lib is open). sys_amiga.c: PPCGetAttr (PPCINFOTAG_CPUPLL) appears to return the PLL code in the high nibble. Calculated bus speed is more likely to be right now. common.c and host.c: Made more changes to handling of ':' and '/' and directory paths. Created in_amiga.c from in_null.c. Support -mouse and -mousepointer. Changes to IDCMP message handling in vid_amiga.c. sys_amiga.c: Changed handling of PLL for calculating bus speed. Hopefully it's right now. sys_amiga.c: Call Host_Shutdown() on exit. Config.cfg is written now. ------------------------------------------------------------------------ v0.3 4 Jan 2000 v0.2 called BestCModeIDTags() even if cybergraphics.library failed to open. That caused crashes and other problems on Amigas without cybergraphics.library. The SAS/C __AMIGADATE__ macro generates the string (4/1/0) for 4th Jan 2000, instead of (4/1/100). ------------------------------------------------------------------------ v0.2 30 Dec 1999 Wrote sys_amiga.c, vid_amiga.c, snd_amiga.c, cd_amiga.c and net_amigaudp.c starting with copies of sys_null.c, vid_null.c, snd_null.c, cd_null.c and net_udp.c, mainly by cutting and pasting from other projects. Created smakefile. PPC assembly files copied from other projects are: amiga_timer.s, amiga_cgxtagfns.s and amiga_socket_lib.s. Also created cdplayer_pragmas.h. It goes in ppcinclude:ppcpragmas. Used includes and libs from SDKs for cybergraphics, AmiTCP and cdplayer.library, all on Aminet. d_edge.c: commented out declaration of screenwidth (conflict with declaration in r_main.c). d_local.h: made sadjust, tadjust, bbextents, bbextentt and prealspandrawer all extern to avoid duplicate definitions of symbols. chase.c: declared SV_RecursiveHullCheck as extern. host_cmd.c: declared SV_SaveSpawnparms as extern. net_dgrm.c: don't #define BAN_TEST common.c: deal with '/' in filenames in calls to COM_AddGameDirectory() SAS/C 6.58 appears to generate bad code for R_TransformFrustum() in r_misc.c when optimisations are turned on. Split r_misc.c into 2 separate files, r_misc1.c and r_misc2.c, the latter containing only R_TransformFrustum(). Compiled r_misc2.c as a special case without optimisation. Had a lot of trouble debugging amigaudp networking code. Tracked down 2 problems after a full day of debugging. The first was that the wrong errno variable was being picked up. Replaced references to errno with calls to bsdsocket.library Errno(). The 2nd problem was in UDP_AddrCompare(). The original code compared addr1->sa_family with addr2->sa_family. Because of the way chars are aligned in the sockaddr_in structure, this included an uninitialised byte. Changed to compare ((struct sockaddr_in *)addr)->sin_family instead. Finished up changing all occurrences of addr->sa_family to ((struct sockaddr_in *)addr)->sin_family. Compiled some low-level rendering modules with ppc-amigaos-gcc instead of scppc. Overall speed increased by about 3%. Discovered that R_DrawSolidClippedSubmodelPolygons() was truncated by scppc to R_DrawSolidClippedSubmodelPolygo() and wouldn't link with untruncated references generated by ppc-amigaos-gcc. Fixed by truncating the name in the source code in r_bsp.c, r_main.c and r_local.h.